import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import Home from '@/views/Home'
import Users from '@/views/Users/Users'
import Right from '@/views/Right/Right'
import Role from '@/views/Right/Role'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/',
      name: 'Home',
      component: Home,
      children:[
        {
          path: '/users',
          name: 'Users',
          component: Users
        },
        {
          path: '/rights',
          name: 'Right',
          component: Right
        },
        {
          path: '/roles',
          name: 'Role',
          component: Role
        }
      ]
    }
  ]
})
